package com.ztgf.order.models.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.ztgf.common.constant.Result;
import com.ztgf.order.models.bo.*;
import com.ztgf.order.models.dto.OrderInvoiceDTO;
import com.ztgf.order.models.vo.OrderInfoVO;
import com.ztgf.order.models.vo.OrderInvoiceDetailsVO;
import com.ztgf.order.models.vo.OrderInvoiceVO;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 订单发票管理服务
 *
 * @author chenyu.wang
 * @Date 2020-06-03 15:58:16
 */
public interface IOrderInvoiceService extends IService<OrderInvoiceDTO> {
    boolean add(OrderInvoiceSaveBO saveBO);

    /**
     * description: 个人中心，我的发票列表
     * param: [bo]
     * author: chenyu.wang
     * date: 2020-06-04
     * return: com.baomidou.mybatisplus.plugins.Page<com.ztgf.order.models.vo.OrderInvoiceVO>
     */
    Page<OrderInvoiceVO> queryMyOderInvocie(OrderMyInvocieBO bo);

    /**
     * description: 根据订单id和店铺id查询发票信息
     * param: [orderId]
     * author: chenyu.wang
     * date: 2020-06-29
     * return: com.ztgf.order.models.dto.OrderInvoiceDTO
     */
    OrderInvoiceDTO getOrderInvoiceByOrderId(Long orderId, Long shopId);

    boolean updateByOrderInfo(OrderOpenInvoiceBO orderOpenInvoiceBO);

    OrderInvoiceDTO getByOrderId(Long orderId);

    boolean updateOpenInvoice(OrderOpenUpInvoiceBO bo);

    OrderInvoiceDetailsVO queryById(Long id);

    /**
     * 下单添加发票抬头信息
     *
     * @param orderInfoVO
     * @param invoiceHeadId
     * @param orderInvoiceBO
     * @return
     */
    public boolean addByOrderInfo(OrderInfoVO orderInfoVO, Long invoiceHeadId, OrderInvoiceBO orderInvoiceBO);


    boolean updateOrderInvoiceById(OrderInvoiceDetailsVO orderInvoiceDetailsVO);

    Result updateLogistics(LogisticsEditBO saveBO);
}
